#region Imported Namespaces
using System;
using System.Collections;
using System.Xml;
using System.Xml.Serialization;

#endregion

namespace PHSRAG.Insight21.FormsManagement.Serialization
{
	#region Class Forms
	/// <summary>
	/// Forms class acts as the rootnode holding all the form objects(Questionniares that make up a protocol).
	/// </summary>
	public class Forms
	{
		#region Instanse variables (private variables)
		private string title;
		private string pIName;
		private string protocolNo;
		private string sponsor;
		private string approvedDate;
		private string expiryDate;
		private string today;
		private string type;
		private string logoLocation;
		private string formsId;
		private string moduleType;
        private string species;
		private bool isInterventionStudy;
		private ArrayList formCollection;
		private ArrayList studyStaff;
		private ArrayList attachments;
		private ArrayList signatures;
		#endregion

		#region Properties (Details to be displayed on Generated PDF)
		/// <summary>
		/// Gets or sets the title of the protocol
		/// </summary>
		public string Title
		{
			get { return title; }
			set { title = value; }
		}

        public string Species
        {
            get { return species; }
            set { species = value; }
        }

		/// <summary>
		/// Gets or sets the name of the Principal Investigator of the protocol
		/// </summary>
		public string PIName
		{
			get { return pIName; }
			set { pIName = value; }
		}

		/// <summary>
		/// Gets or sets the protocol number
		/// </summary>
		public string ProtocolNo
		{
			get { return protocolNo; }
			set { protocolNo = value; }
		}

		/// <summary>
		/// Gets or sets the primary sponsor of the protocol
		/// </summary>
		public string Sponsor
		{
			get { return sponsor; }
			set { sponsor = value; }
		}

		/// <summary>
		/// Gets or sets the date on which the protocol is approved by HRO
		/// </summary>
		public string ApprovedDate
		{
			get { return approvedDate; }
			set { approvedDate = value; }
		}

		/// <summary>
		/// Gets or sets the date on which the protocol expires
		/// </summary>
		public string ExpiryDate
		{
			get { return expiryDate; }
			set { expiryDate = value; }
		}

		/// <summary>
		/// Gets or sets the date on which the Pdf is generated
		/// </summary>
		public string Today
		{
			get { return today; }
			set { today = value; }
		}

		/// <summary>
		/// Gets or sets the type of the protocol
		/// </summary>
		public string Type
		{
			get { return type; }
			set { type = value; }
		}

		/// <summary>
		/// Gets or sets the physical path of the logo
		/// </summary>
		public string LogoLocation
		{
			get { return logoLocation; }
			set { logoLocation = value; }
		}

		/// <summary>
		/// Gets or sets the FormsID of the process
		/// </summary>
		public string FormsId
		{
			get { return formsId; }
			set { formsId = value; }
		}

		/// <summary>
		/// Gets or sets the moduleType of the Protocol/process
		/// </summary>
		public string ModuleType
		{
			get { return moduleType; }
			set { moduleType = value; }
		}


		
		/// <summary>
		/// Gets or sets whether or not the protocol is intervention or non-intervention
		/// </summary>
		public bool IsInterventionStudy
		{
			get { return isInterventionStudy; }
			set { isInterventionStudy = value; }
		}


		/// <summary>
		/// Gets or sets the collection of study persons staffed to the protocol
		/// </summary>
		[XmlArrayItem(ElementName = "StudyPerson", Type = typeof(FormStudyPerson))]
		[XmlArray(ElementName = "")]
		public ArrayList StudyStaff
		{
			get { return studyStaff; }
			set { studyStaff = value; }
		}

		/// <summary>
		/// Gets or sets the collection of attachements to the protocol
		/// </summary>
		[XmlArrayItem(ElementName = "Attachment", Type = typeof(FormAttachment))]
		[XmlArray(ElementName = "")]
		public ArrayList Attachments
		{
			get { return attachments; }
			set { attachments = value; }
		}

		/// <summary>
		/// Gets or sets the collection of Form objects
		/// </summary>
		[XmlArrayItem(ElementName = "Signature", Type = typeof(FormSignature))]
		[XmlArray(ElementName = "")]
		public ArrayList Signatures
		{
			get { return signatures; }
			set { signatures = value; }
		}

		/// <summary>
		/// Gets or sets the collection of Form objects
		/// </summary>
		[XmlArrayItem(ElementName = "Form", Type = typeof(Form))]
		[XmlArray(ElementName = "")]
		public ArrayList FormCollection
		{
			get { return formCollection; }
			set { formCollection = value; }
		}


		#endregion

		#region Constructors
		/// <summary>
		/// Default constructor required to serialize the Forms object
		/// </summary>
		public Forms()
		{
			signatures = new ArrayList();
			formCollection = new ArrayList();
		}
		#endregion
	}
	#endregion
}
